# -*- coding: utf-8 -*-
import os
import shutil
import time
# 删除UE项目冗余文件，打包项目
print('Delete Files----------')
root_UE_First = r'E:\Code\UE\ueproject'
root_UE = r'E:\Code\UE\ueproject\MR'
root_deleteFile = [
  r'E:\Code\UE\ueproject\MR\Saved',
  r'E:\Code\UE\ueproject\MR\Intermediate',
  r'E:\Code\UE\ueproject\MR\Binaries',
  r'E:\Code\UE\ueproject\MR\DerivedDataCache',
  r'E:\Code\UE\ueproject\MR\.vs',]
for filePath_UE in root_deleteFile:
  if os.path.isdir(filePath_UE):
    print(filePath_UE)
    shutil.rmtree(filePath_UE)
print('Delete finish----------')
# 打包项目
time_string = time.strftime("%Y%m%d%H%M")
print(time_string)
print('zip----------')
shutil.make_archive(root_UE_First + '\Roadshow' + time_string, 'zip', root_UE)
print('zip finish----------')

# os.startfile(r'E:\Code\UE\ueproject\MR\MR.uproject')


